home *** CD-ROM | disk | FTP | other *** search
- Path: news.th-darmstadt.de!news
- From: Enno Sandner <enno@intellektik.informatik.th-darmstadt.de>
- Newsgroups: comp.lang.c++
- Subject: Re: Virtual function does not make any sense unless it is pure.
- Date: Fri, 12 Apr 1996 09:31:45 +0200
- Organization: Fachbereich Informatik, TH Darmstadt
- Message-ID: <316E06E1.167EB0E7@intellektik.informatik.th-darmstadt.de>
- References: <4kkhbc$nj4@brahms.udel.edu>
- NNTP-Posting-Host: kitz.intellektik.informatik.th-darmstadt.de
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.01 (X11; I; SunOS 4.1.3 sun4m)
-
- Yue-hong Zheng wrote:
- >
- > Can any body give me any examples to show non-pure virtual function does
- > make sense?
-
- Hmm,
- any implementation for a pure-virtual function provided by some
- subclass is also virtual. IMO it makes sense to provide an
- implementation for a service ;-).
- Anyway it's often useful to have a 'default behavior' for a virtual
- function that can be changed by later subclasses.
-
- Enno
-